package E2013;

class Employe{

    private String ID;

    private String name;

    private double basicSalary;

    private double bonus;

    public Employe(String ID,String name,double basicSalary,double bonus){

        this.ID=ID;

        this.name=name;

        this.basicSalary=basicSalary;

        this.bonus=bonus;

    }

    public void setID(String ID){

        this.ID=ID;

    }

    public String getID(){

        return ID;

    }

    public void setName(String name){

        this.name=name;

    }

    public String getName(){

        return name;

    }

    public void setBasicSalary(double basicSalary){

        this.basicSalary=basicSalary;

    }

    public double getBasicSalary(){

        return basicSalary;

    }

    public void setBonus(double bonus){

        this.bonus=bonus;

    }

    public double getBonus(){

        return bonus;

    }

    public double getTax(){     //计算所得税

        double tax=0.0;

        if((basicSalary+bonus)>1600){

            tax=(basicSalary+bonus-1600)*15/100;

        }



        return tax;

    }

    public double getRealSalary(){     //计算实际工资

        double realSalary;

        realSalary=basicSalary+bonus-getTax();

        return realSalary;

    }

}

public class Employee_{

    public static void main(String args[]){

        Employe emp=new Employe("AR001","jack",1500.0,200.0);

        System.out.println("姓名："+emp.getName());

        System.out.println("所得税："+emp.getTax());

        System.out.println("实际工资："+emp.getRealSalary());

    }

}